const router = require('koa-router')()
const Controller = require('../controllers/menuController')

router.prefix('/menus')

router.get('/', Controller.findAll)

router.get('/by_role_id', Controller.findByRoleId)

router.get('/by_tree', Controller.getMenuTree)

router.post('/', Controller.create)

router.put('/', Controller.update)

router.delete('/id', Controller.removeById)

router.get('/:id', Controller.findById)

module.exports = router
